package com.ethink.framework.common.db;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import lombok.Data;

import java.time.LocalDateTime;

/**
 * 数据库实体父类
 *
 * @author yunduo
 */
@Data
public class SuperEntity {

    public final static String ID = "id";
    public final static String ORG_ID = "org_id";
    public final static String IS_DELETED = "is_deleted";
    public final static String CREATE_TIME = "create_time";
    public final static String UPDATE_TIME = "update_time";
    public final static String CREATE_USER = "create_user";
    public final static String UPDATE_USER = "update_user";
    public final static String REMARK = "remark";


    /**
     * 主键ID
     */
    @TableId
    private Long id;
    /**
     * 商户ID
     */
    @TableField(fill = FieldFill.INSERT,exist = false)
    private Long orgId;
    /**
     * 数据创建时间
     */
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    /**
     * 数据更新时间
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    /**
     * 数据删除标识
     */
    @TableField(fill = FieldFill.INSERT)
    private Boolean isDeleted;

    /**
     * 数据创建的系统用户id
     */
    @TableField(fill = FieldFill.INSERT)
    private String createUser;

    /**
     * 数据修改的系统用户id
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String updateUser;

    /**
     * 备注
     */
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private String remark;


}
